package com.netbao.sys.vomapper;

import com.netbao.sys.model.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleVoMapper {
//    @Select("SELECT * FROM sys_role WHERE id IN(#{id})")
    @Select("SELECT * FROM sys_role WHERE id IN(SELECT role_id FROM sys_user_role WHERE user_id=#{id})")
    public List<Role> findByUserId(Long id);
}
